<template>
  <div class="accessory-show-div">
    <div v-for="el in accessory" :key="'user-show-chip-' + el.id">
      <div class="name" v-text="el.name" @click="download(el)"></div>
    </div>
  </div>
</template>

<script>
import Http from "../../js/mod.http";
import ToastUtils from "../../mod/utils.toast";
import strings from "../../assets/strings";
import Utils from "../../js/mod.utils";

export default {
  props: ["accessory"],
  data() {
    return {
      person: "./static/images/person.png"
    };
  },
  created: function() {
    let _this = this;
  },
  methods: {
    download: function(el) {
      let _this = this;
      var name = el.name;
      var url = el.url;
      if (name && url) {
        Utils.tipDownloadFile(url, name);
      }
    }
  }
};
</script>

<style scoped>
.accessory-show-div {
  padding: 10px 0px;
  width: 100%;
}
.accessory-show-div .name {
  padding: 5px 0px;
  width: 100%;
  cursor: pointer;
  color: #06c;
  text-decoration: underline;
}
</style>
